#include <iostream>
#include <set>
using namespace std;

signed main()
{
    set<int> s;
    int N;
    cin>>N;
    for(int i=1;i<=N;i++){
        s.insert(i/2+i/3+i/5);
    }
    cout<<s.size()<<"\n";
    return 0;
}
